<?php
class CProfiler{
	public function __construct(){
		echo "CProfiler::constructor<br>";
		$this->get_post();	
	}
	
	private function get_post(){
		echo "CProfiler::get_post<br>";
		for ($i = 1; $i < 3; $i++){
			$oPost = new CPost($i);
		}
	}
	
	public function get_occurrence(){
		echo "CProfiler::get_occurence<br>";		
	}
}

class CPost{
	private $ID;

	public function __construct($ID){
		echo "CPost::constructor" . $this->ID . "<br>";
		$this->get_vote();
	}

	public function get_vote(){
		echo "CPost::get_vote" . $this->ID . "<br>";
		parent::get_occurrence();
	}
} 
$oProfiler = new CProfiler();
?>